﻿@using  MockSchoolManagement.Application.Courses.Dtos
@model CourseCreateViewModel
@{ ViewBag.Title = "创建课程信息"; }

<form asp-action="create" method="post" class="mt-3">
    <div asp-validation-summary="All" class="text-danger"></div>

    <div class="form-group row">
        <label asp-for="CourseID" class="col-sm-2 col-form-label"></label>
        <div class="col-sm-10">
            <input asp-for="CourseID" class="form-control" placeholder="请输入课程编码" />
            <span asp-validation-for="CourseID" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group row">
        <label asp-for="Title" class="col-sm-2 col-form-label"></label>
        <div class="col-sm-10">
            <input asp-for="Title" class="form-control" placeholder="请输入课程名称" />
            <span asp-validation-for="Title" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group row">
        <label asp-for="Credits" class="col-sm-2 col-form-label"></label>
        <div class="col-sm-10">
            <input asp-for="Credits" type="number" class="form-control" placeholder="课程学分" />
            <span asp-validation-for="Credits" class="text-danger"></span>
        </div>
    </div>
    <div class="form-group row">
        <label asp-for="DepartmentList" class="col-sm-2 col-form-label"></label>
        <div class="col-sm-10">
            <select asp-for="DepartmentID"
                    class="custom-select mr-sm-2"
                    asp-items="@Model.DepartmentList">
                <option value="">请选择</option>
            </select>
            <span asp-validation-for="DepartmentList" class="text-danger"></span>
        </div>
    </div>

    <div class="form-group row">
        <div class="col-sm-10">
            <button type="submit" class="btn btn-primary">创建</button>
        </div>
    </div>
</form>